<template>
  <div id="app" :class="style ? 'theme1' : ''">
    <!-- 路由占位符 -->
    <router-view></router-view>
  </div>
</template>

<script>
//引入创建的eventBus
import eventBus from "@/utils/eventBus";

export default {
  data() {
    return {
      style: false,
    };
  },
  created() {
    eventBus.$on("global_theme", (msg) => {
      this.style = msg;
    });
  },
};
</script>


<style>
/* 这里写全局样式 宽高100% */
html,
body,
#app,
.layout {
  height: 100%;
}
</style>